﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace ProductStore.Models
{
    public class Product
    {
        [Key]
        public string ProductCode { get; set; }

        [Required]
        public string Name { get; set; }
        
        [Required]
        public decimal Price { get; set; }

        [Required]
        public string Description { get; set; }

        [Display(Name="Category")]
        public string CategoryCode { get; set; }

        public virtual Category Category { get; set; }
        public virtual List<OrderDetail> OrderDetails { get; set; }
    }
}